import Axios from 'axios';
export const getDetail = data => {
  return {
    type: 'GETDETAIL',
    payload: data
  };
};
export function fetchDetail(id) {
  return dispatch => {
    return Axios({
      url: `http://localhost:3000/people/${id}`,
      method: 'get'
    }).then(res => {
      dispatch(getDetail(res.data));
    });
  };
}
